package cn.yuanqiao.archive.storeRoom.mapper;

import cn.yuanqiao.archive.storeRoom.domain.Storeroom;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 库房信息Mapper接口
 * 
 * @author xy
 * @date 2023-06-16
 */
@Mapper
public interface StoreroomMapper 
{
    /**
     * 查询库房信息
     * 
     * @param storeId 库房信息主键
     * @return 库房信息
     */
    public Storeroom selectStoreroomByStoreId(@Param("storeId") Long storeId, @Param("code")String code);

    /**
     * 查询库房信息列表
     * 
     * @param storeroom 库房信息
     * @return 库房信息集合
     */
    public List<Storeroom> selectStoreroomList(@Param("storeroom") Storeroom storeroom, @Param("code")String code);

    /**
     * 新增库房信息
     * 
     * @param storeroom 库房信息
     * @return 结果
     */
    public int insertStoreroom(@Param("storeroom")Storeroom storeroom, @Param("code")String code);

    /**
     * 修改库房信息
     * 
     * @param storeroom 库房信息
     * @return 结果
     */
    public int updateStoreroom(@Param("storeroom")Storeroom storeroom, @Param("code")String code);

    /**
     * 删除库房信息
     * 
     * @param storeId 库房信息主键
     * @return 结果
     */
    public int deleteStoreroomByStoreId(@Param("storeId")Long storeId, @Param("code")String code);

    /**
     * 批量删除库房信息
     * 
     * @param storeIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteStoreroomByStoreIds(@Param("storeIds")Long[] storeIds, @Param("code")String code);

    public List<Map<String, Object>> getStores(@Param("code")String code);

    public int getCountByCode(@Param("storeCode") String storeCode, @Param("code") String code);

    int checkStore(@Param("code") String code, @Param("storeId") Long storeId);

    List<Storeroom> selectStoreroomListByRole(@Param("storeroom") Storeroom storeroom, @Param("code")String code, @Param("loginId")Long loginId);
}
